//
//  Networking.h
//  DouBan1.0
//
//  Created by Aurora on 15/11/26.
//  Copyright © 2015年 Aurora. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^Block) (NSDictionary *tempDataDic);

@interface Networking : NSObject
//声明一个方法，将post和get请求进行封装
+ (void)receiveDataWithURLString:(NSString *)string
                          method:(NSString *)method
                            body:(NSString *)body
                           Block:(Block)block;


+(NSString *)filePath:(NSString *)filePaths
                 url :(NSString *)url
             fileName:(NSString *)fileName
          hospital_id:(NSString *)hospital_id;

+ (NSString *)getLastDayOfMonth;


+ (NSString *)getCurrentTime;

+ (NSString *)getOneYearLaterTime:(NSString *)nowtime yearNumber:(CGFloat)yearNumber;

//POST请求
+ (void)ManagerPost:(NSString *)URLString
         parameters:(id)parameters
            success:(void (^)(id responseObject))success
            failure:(void (^)(NSError *error))failure;


+ (void)ManagerGet:(NSString *)URLString
         parameters:(id)parameters
            success:(void (^)(id responseObject))success
            failure:(void (^)(NSError *error))failure;

-(void) alert:(NSString*)msg ;


//后台返回颜色转换
+ (UIColor *)colorWithHexString:(NSString *)stringToConvert;


+ (UIColor *)colorWithRGBHex:(UInt32)hex;

//获取HTTP请求状态码
+ (NSDictionary *)getStatusWithUrl:(NSString *)Url;
@end
